const mongoose = require("mongoose")
const Schema = mongoose.Schema

// 访问次数-数据模型
const VisitSchema = new Schema({
    // 年月
    years_month: {
        type: String,
        required: true
    },
    // 次数
    number: {
        type: Number,
        default: 0
    },
    // 创建时间
    date: {
        type: Date,
        default: Date.now // 默认值
    }
})

module.exports = Visit = mongoose.model("visits", VisitSchema)